package cz.muni.fi.pa165.musiclibrary.implejb.service.dto.translator;

import org.apache.commons.lang3.Validate;

import cz.muni.fi.pa165.musiclibrary.api.database.entity.IGenre;
import cz.muni.fi.pa165.musiclibrary.api.service.dto.IGenreDTO;

/**
 * Class with static methods for translating between {@link IGenre} 
 * and {@link IGenreDTO} objects.
 * 
 * @author Maros Kucbel
 * @date 2012-10-28T15:37:50+0100
 */
public final class GenreDTOTranslator {

//    /**
//     * Translates {@link IGenre} object into {@link IGenreDTO} object.
//     * @param genre Genre.
//     * @return Instance of {@link IGenreDTO} that correspons with given parameter.
//     * @throws IllegalArgumentException If parameter is {@code null}.
//     */
//    public static IGenreDTO translateToDTO(final IGenre genre) {
//        Validate.isTrue(genre != null, "Genre should not be null.");
//        final IGenreDTO genreDTO = new GenreDTO();
//        genreDTO.setIdGenre(genre.getIdGenre());
//        genreDTO.setName(genre.getName());
//        return genreDTO;
//    }
//    
//    /**
//     * Translates {@link IGenreDTO} object into {@link IGenre} object.
//     * @param genre GenreDTO.
//     * @return Instance of {@link IGenre} that correspons with given parameter.
//     * @throws IllegalArgumentException If parameter is {@code null}.
//     */
//    public static IGenre translateFromDTO(final IGenreDTO genreDTO) {
//        Validate.isTrue(genreDTO != null, "GenreDTO should not be null.");
//        final IGenre genre = new Genre();
//        genre.setIdGenre(genreDTO.getIdGenre());
//        genre.setName(genreDTO.getName());
//        return genre;
//    }
}